#pragma once

#include "Effect.h"
#include "LevelAffixes.h"

#include <vector>
#include <map>
using std::vector;
using std::map;
using std::pair;

extern unsigned int getSoulLevel(const Soulgem& soul, float rank);

class ItemType {
public:
	ItemType(vector< pair< const Effect*, const unsigned long > > effects = vector< pair< const Effect*, const unsigned long > >());
	bool addToLevel(unsigned int level, const Affix* affix);
	bool addToLevel(unsigned int level, vector<const Affix*> affixes);
	pair<unsigned int, LevelAffixes*> getLevel(unsigned int level);
	const Affix* chooseRandomAffix(unsigned int level, bool calcAllLevelsLtEq = true);
private:
	map<unsigned int, LevelAffixes> levels;
};
